home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2647 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  4.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news text default
99% file C source, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6e 6e | 74 70 64 32 2e 63 78 6f |Path: nn|tpd2.cxo|
|00000010| 2e 64 65 63 2e 63 6f 6d | 21 75 73 65 6e 65 74 0a |.dec.com|!usenet.|
|00000020| 46 72 6f 6d 3a 20 42 72 | 69 61 6e 20 48 69 62 62 |From: Br|ian Hibb|
|00000030| 65 72 74 20 3c 62 5f 68 | 69 62 62 65 72 74 40 63 |ert <b_h|ibbert@c|
|00000040| 73 63 33 32 2e 65 6e 65 | 74 2e 64 65 63 2e 63 6f |sc32.ene|t.dec.co|
|00000050| 6d 3e 0a 4e 65 77 73 67 | 72 6f 75 70 73 3a 20 63 |m>.Newsg|roups: c|
|00000060| 6f 6d 70 2e 6c 61 6e 67 | 2e 63 0a 53 75 62 6a 65 |omp.lang|.c.Subje|
|00000070| 63 74 3a 20 52 65 3a 20 | 43 61 6e 20 62 65 20 43 |ct: Re: |Can be C|
|00000080| 20 61 20 73 6f 20 73 74 | 72 61 6e 67 65 20 6c 61 | a so st|range la|
|00000090| 6e 67 75 61 67 65 20 3f | 3f 3f 2e 20 50 72 6f 62 |nguage ?|??. Prob|
|000000a0| 6c 65 6d 20 77 69 74 68 | 20 61 20 66 75 6e 63 74 |lem with| a funct|
|000000b0| 69 6f 6e 20 72 65 74 75 | 72 6e 69 6e 67 20 61 20 |ion retu|rning a |
|000000c0| 70 6f 69 6e 74 65 72 2e | 2e 2e 0a 44 61 74 65 3a |pointer.|...Date:|
|000000d0| 20 32 32 20 4a 61 6e 20 | 31 39 39 36 20 32 31 3a | 22 Jan |1996 21:|
|000000e0| 35 32 3a 33 38 20 47 4d | 54 0a 4f 72 67 61 6e 69 |52:38 GM|T.Organi|
|000000f0| 7a 61 74 69 6f 6e 3a 20 | 44 69 67 69 74 61 6c 20 |zation: |Digital |
|00000100| 45 71 75 69 70 6d 65 6e | 74 20 43 6f 72 70 6f 72 |Equipmen|t Corpor|
|00000110| 61 74 69 6f 6e 0a 4d 65 | 73 73 61 67 65 2d 49 44 |ation.Me|ssage-ID|
|00000120| 3a 20 3c 34 65 31 30 76 | 36 24 6c 73 37 40 6e 6e |: <4e10v|6$ls7@nn|
|00000130| 74 70 64 32 2e 63 78 6f | 2e 64 65 63 2e 63 6f 6d |tpd2.cxo|.dec.com|
|00000140| 3e 0a 52 65 66 65 72 65 | 6e 63 65 73 3a 20 3c 34 |>.Refere|nces: <4|
|00000150| 65 30 31 35 6a 24 64 72 | 74 40 68 65 72 6d 65 73 |e015j$dr|t@hermes|
|00000160| 2e 66 75 6e 64 70 2e 61 | 63 2e 62 65 3e 0a 4e 4e |.fundp.a|c.be>.NN|
|00000170| 54 50 2d 50 6f 73 74 69 | 6e 67 2d 48 6f 73 74 3a |TP-Posti|ng-Host:|
|00000180| 20 70 65 6f 31 30 31 32 | 5f 70 6f 72 74 31 2e 70 | peo1012|_port1.p|
|00000190| 65 6f 2e 64 65 63 2e 63 | 6f 6d 0a 4d 69 6d 65 2d |eo.dec.c|om.Mime-|
|000001a0| 56 65 72 73 69 6f 6e 3a | 20 31 2e 30 0a 43 6f 6e |Version:| 1.0.Con|
|000001b0| 74 65 6e 74 2d 54 79 70 | 65 3a 20 74 65 78 74 2f |tent-Typ|e: text/|
|000001c0| 70 6c 61 69 6e 3b 20 63 | 68 61 72 73 65 74 3d 75 |plain; c|harset=u|
|000001d0| 73 2d 61 73 63 69 69 0a | 43 6f 6e 74 65 6e 74 2d |s-ascii.|Content-|
|000001e0| 54 72 61 6e 73 66 65 72 | 2d 45 6e 63 6f 64 69 6e |Transfer|-Encodin|
|000001f0| 67 3a 20 37 62 69 74 0a | 58 2d 4d 61 69 6c 65 72 |g: 7bit.|X-Mailer|
|00000200| 3a 20 4d 6f 7a 69 6c 6c | 61 20 31 2e 32 4e 20 28 |: Mozill|a 1.2N (|
|00000210| 57 69 6e 64 6f 77 73 3b | 20 49 3b 20 31 36 62 69 |Windows;| I; 16bi|
|00000220| 74 29 0a 54 6f 3a 20 66 | 6d 65 6c 6f 40 62 69 71 |t).To: f|melo@biq|
|00000230| 2e 66 75 6e 64 70 2e 61 | 63 2e 62 65 0a 0a 46 72 |.fundp.a|c.be..Fr|
|00000240| 61 6e 63 69 73 63 6f 20 | 4d 65 6c 6f 20 4c 65 64 |ancisco |Melo Led|
|00000250| 65 72 6d 61 6e 6e 20 3c | 66 6d 65 6c 6f 40 62 69 |ermann <|fmelo@bi|
|00000260| 71 2e 66 75 6e 64 70 2e | 61 63 2e 62 65 3e 20 77 |q.fundp.|ac.be> w|
|00000270| 72 6f 74 65 3a 0a 3e 48 | 69 20 65 76 65 72 79 62 |rote:.>H|i everyb|
|00000280| 6f 64 79 20 21 2c 20 49 | 20 68 61 76 65 20 61 20 |ody !, I| have a |
|00000290| 70 72 6f 62 6c 65 6d 20 | 74 68 61 74 20 66 6f 72 |problem |that for|
|000002a0| 20 6d 65 20 61 70 70 65 | 61 72 73 20 74 6f 20 61 | me appe|ars to a|
|000002b0| 20 72 65 61 6c 6c 79 20 | 73 74 72 61 6e 67 65 20 | really |strange |
|000002c0| 0a 3e 6f 6e 65 2e 20 49 | 20 68 61 76 65 20 61 20 |.>one. I| have a |
|000002d0| 66 75 6e 63 74 69 6f 6e | 20 74 68 61 74 20 63 61 |function| that ca|
|000002e0| 6c 6c 20 61 6e 6f 74 68 | 65 72 20 66 75 6e 63 74 |ll anoth|er funct|
|000002f0| 69 6f 6e 2e 20 54 68 65 | 20 66 75 6e 63 74 69 6f |ion. The| functio|
|00000300| 6e 20 0a 3e 74 68 61 74 | 20 69 73 20 63 61 6c 6c |n .>that| is call|
|00000310| 65 64 20 69 73 20 74 68 | 65 20 6e 65 78 74 20 6f |ed is th|e next o|
|00000320| 6e 65 3a 0a 3e 0a 0a 49 | 66 20 49 20 75 6e 64 65 |ne:.>..I|f I unde|
|00000330| 72 73 74 61 6e 64 20 74 | 68 69 73 20 66 75 6e 63 |rstand t|his func|
|00000340| 74 69 6f 6e 20 63 6f 72 | 72 65 63 74 6c 79 2c 20 |tion cor|rectly, |
|00000350| 49 74 20 69 73 20 73 75 | 70 70 6f 73 65 64 20 74 |It is su|pposed t|
|00000360| 6f 20 73 74 65 70 20 74 | 68 72 6f 75 67 68 20 0a |o step t|hrough .|
|00000370| 74 68 65 20 6c 69 73 74 | 20 6f 66 20 68 65 61 76 |the list| of heav|
|00000380| 79 5f 61 74 6f 6d 73 20 | 61 6e 64 20 72 65 74 75 |y_atoms |and retu|
|00000390| 72 6e 20 61 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |rn a poi|nter to |
|000003a0| 74 68 65 20 68 65 61 76 | 79 20 61 74 6f 6d 20 73 |the heav|y atom s|
|000003b0| 74 72 75 63 74 75 72 65 | 20 0a 74 68 61 74 20 6d |tructure| .that m|
|000003c0| 61 74 63 68 65 73 20 74 | 68 65 20 72 65 73 69 64 |atches t|he resid|
|000003d0| 75 65 5f 6e 75 6d 62 65 | 72 2e 20 20 54 68 65 72 |ue_numbe|r. Ther|
|000003e0| 65 20 69 73 20 61 20 42 | 49 47 20 70 72 6f 62 6c |e is a B|IG probl|
|000003f0| 65 6d 20 77 69 74 68 20 | 74 68 69 73 20 0a 72 6f |em with |this .ro|
|00000400| 75 74 69 6e 65 20 74 68 | 61 74 20 63 61 6e 20 63 |utine th|at can c|
|00000410| 61 75 73 65 20 61 20 6e | 65 76 65 72 20 65 6e 64 |ause a n|ever end|
|00000420| 69 6e 67 20 6c 6f 6f 70 | 2e 20 20 49 66 20 74 68 |ing loop|. If th|
|00000430| 65 20 70 6f 73 69 74 69 | 6f 6e 5f 70 74 72 20 70 |e positi|on_ptr p|
|00000440| 6f 69 6e 74 73 0a 74 6f | 20 61 20 6c 69 73 74 20 |oints.to| a list |
|00000450| 74 68 61 74 20 64 6f 65 | 73 20 6e 6f 74 20 63 6f |that doe|s not co|
|00000460| 6e 74 61 69 6e 20 61 6e | 20 65 6c 65 6d 65 6e 74 |ntain an| element|
|00000470| 20 74 68 61 74 20 6d 61 | 74 63 68 65 73 20 74 68 | that ma|tches th|
|00000480| 65 20 0a 72 65 73 69 64 | 75 65 5f 6e 75 6d 62 65 |e .resid|ue_numbe|
|00000490| 72 20 28 6f 72 20 69 66 | 20 74 68 65 20 70 6f 69 |r (or if| the poi|
|000004a0| 6e 74 65 72 20 69 73 20 | 70 6f 69 6e 74 69 6e 67 |nter is |pointing|
|000004b0| 20 62 65 79 6f 6e 64 20 | 74 68 65 20 74 68 65 20 | beyond |the the |
|000004c0| 70 6c 61 63 65 20 69 6e | 20 74 68 65 20 0a 6c 69 |place in| the .li|
|000004d0| 73 74 20 74 68 61 74 20 | 68 61 73 20 74 68 65 20 |st that |has the |
|000004e0| 63 6f 72 72 65 63 74 20 | 65 6c 65 6d 65 6e 74 29 |correct |element)|
|000004f0| 20 74 68 65 72 65 20 77 | 69 6c 6c 20 62 65 20 6e | there w|ill be n|
|00000500| 6f 20 77 61 79 20 74 6f | 20 65 78 69 74 20 74 68 |o way to| exit th|
|00000510| 65 20 0a 77 68 69 6c 65 | 20 6c 6f 6f 70 2e 20 20 |e .while| loop. |
|00000520| 59 6f 75 72 20 70 72 6f | 67 72 61 6d 20 77 69 6c |Your pro|gram wil|
|00000530| 6c 20 68 61 6e 67 2e 20 | 20 41 67 61 69 6e 2c 20 |l hang. | Again, |
|00000540| 49 20 61 6d 20 61 73 73 | 75 6d 69 6e 67 20 74 68 |I am ass|uming th|
|00000550| 65 20 63 6f 6f 68 5f 70 | 74 72 0a 69 73 20 75 73 |e cooh_p|tr.is us|
|00000560| 65 64 20 61 73 20 61 20 | 4e 55 4c 4c 20 74 65 72 |ed as a |NULL ter|
|00000570| 6d 69 6e 61 74 65 64 20 | 6c 69 6e 6b 65 64 20 6c |minated |linked l|
|00000580| 69 73 74 20 6f 66 20 68 | 65 61 76 79 5f 61 74 6f |ist of h|eavy_ato|
|00000590| 6d 20 73 74 72 75 63 74 | 75 72 65 73 2e 0a 0a 0a |m struct|ures....|
|000005a0| 3e 73 74 72 75 63 74 20 | 68 65 61 76 79 5f 61 74 |>struct |heavy_at|
|000005b0| 6f 6d 20 2a 53 65 74 5f | 50 6f 73 69 74 69 6f 6e |om *Set_|Position|
|000005c0| 5f 41 41 5f 4e 75 6d 62 | 65 72 20 28 69 6e 74 20 |_AA_Numb|er (int |
|000005d0| 72 65 73 69 64 75 65 5f | 6e 75 6d 62 65 72 2c 20 |residue_|number, |
|000005e0| 0a 3e 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.> | |
|000005f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000600| 20 20 20 20 20 20 20 20 | 20 20 73 74 72 75 63 74 | | struct|
|00000610| 20 68 65 61 76 79 5f 61 | 74 6f 6d 20 2a 70 6f 73 | heavy_a|tom *pos|
|00000620| 69 74 69 6f 6e 5f 70 74 | 72 29 0a 3e 7b 0a 3e 20 |ition_pt|r).>{.> |
|00000630| 69 6e 74 20 6f 75 74 3b | 0a 3e 20 0a 3e 20 6f 75 |int out;|.> .> ou|
|00000640| 74 20 3d 20 30 3b 0a 3e | 0a 3e 20 77 68 69 6c 65 |t = 0;.>|.> while|
|00000650| 20 28 6f 75 74 20 21 3d | 20 31 29 0a 3e 20 7b 0a | (out !=| 1).> {.|
|00000660| 3e 20 20 69 66 20 28 28 | 2a 70 6f 73 69 74 69 6f |> if ((|*positio|
|00000670| 6e 5f 70 74 72 29 2e 72 | 65 73 5f 6e 75 6d 62 65 |n_ptr).r|es_numbe|
|00000680| 72 20 21 3d 20 72 65 73 | 69 64 75 65 5f 6e 75 6d |r != res|idue_num|
|00000690| 62 65 72 29 0a 3e 20 20 | 7b 0a 3e 20 20 20 69 66 |ber).> |{.> if|
|000006a0| 20 28 28 2a 70 6f 73 69 | 74 69 6f 6e 5f 70 74 72 | ((*posi|tion_ptr|
|000006b0| 29 2e 63 6f 6f 68 5f 70 | 74 72 20 21 3d 20 4e 55 |).cooh_p|tr != NU|
|000006c0| 4c 4c 29 0a 3e 20 20 20 | 7b 0a 3e 20 20 20 20 70 |LL).> |{.> p|
|000006d0| 6f 73 69 74 69 6f 6e 5f | 70 74 72 20 3d 20 28 2a |osition_|ptr = (*|
|000006e0| 70 6f 73 69 74 69 6f 6e | 5f 70 74 72 29 2e 63 6f |position|_ptr).co|
|000006f0| 6f 68 5f 70 72 74 3b 0a | 3e 20 20 20 7d 0a 0a 59 |oh_prt;.|> }..Y|
|00000700| 6f 75 20 63 6f 75 6c 64 | 20 61 64 64 20 61 6e 20 |ou could| add an |
|00000710| 0a 20 20 20 20 65 6c 73 | 65 20 72 65 74 75 72 6e |. els|e return|
|00000720| 20 4e 55 4c 4c 3b 20 0a | 73 74 61 74 65 6d 65 6e | NULL; .|statemen|
|00000730| 74 20 68 65 72 65 20 74 | 6f 20 65 78 69 74 20 74 |t here t|o exit t|
|00000740| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 69 66 20 79 |he funct|ion if y|
|00000750| 6f 75 20 72 65 61 63 68 | 20 74 68 65 20 65 6e 64 |ou reach| the end|
|00000760| 20 6f 66 20 74 68 65 20 | 6c 69 73 74 20 0a 77 69 | of the |list .wi|
|00000770| 74 68 6f 75 74 20 66 69 | 6e 64 69 6e 67 20 74 68 |thout fi|nding th|
|00000780| 65 20 64 65 73 69 72 65 | 64 20 72 65 73 5f 6e 75 |e desire|d res_nu|
|00000790| 6d 62 65 72 2e 0a 0a 0a | 3e 20 20 7d 0a 3e 20 20 |mber....|> }.> |
|000007a0| 20 65 6c 73 65 0a 3e 20 | 20 20 7b 0a 3e 20 20 20 | else.> | {.> |
|000007b0| 20 72 65 74 75 72 6e 20 | 28 70 6f 73 69 74 69 6f | return |(positio|
|000007c0| 6e 5f 70 74 72 29 3b 0a | 3e 20 20 20 20 6f 75 74 |n_ptr);.|> out|
|000007d0| 20 3d 20 31 3b 0a 0a 54 | 68 65 20 6f 75 74 20 3d | = 1;..T|he out =|
|000007e0| 20 31 3b 20 73 74 61 74 | 65 6d 65 6e 74 20 68 65 | 1; stat|ement he|
|000007f0| 72 65 20 69 73 20 6e 65 | 76 65 72 20 65 78 65 63 |re is ne|ver exec|
|00000800| 75 74 65 64 2e 20 54 68 | 65 20 72 65 74 75 72 6e |uted. Th|e return|
|00000810| 20 73 74 61 74 65 6d 65 | 6e 74 20 0a 70 72 65 63 | stateme|nt .prec|
|00000820| 65 64 69 6e 67 20 69 74 | 20 77 69 6c 6c 20 65 78 |eding it| will ex|
|00000830| 69 74 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 2e |it the f|unction.|
|00000840| 0a 0a 3e 20 20 20 7d 0a | 3e 20 7d 0a 3e 7d 20 20 |..> }.|> }.>} |
|00000850| 20 2f 2a 20 65 6e 64 20 | 6f 66 20 53 65 74 5f 50 | /* end |of Set_P|
|00000860| 6f 73 69 74 69 6f 6e 5f | 41 41 5f 4e 75 6d 62 65 |osition_|AA_Numbe|
|00000870| 72 20 66 75 6e 63 74 69 | 6f 6e 20 2a 2f 0a 3e 0a |r functi|on */.>.|
|00000880| 3e 0a 0a 49 20 77 6f 75 | 6c 64 20 72 65 77 72 69 |>..I wou|ld rewri|
|00000890| 74 65 20 74 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |te this |function|
|000008a0| 20 74 6f 20 6d 61 6b 65 | 20 69 74 20 61 20 6c 69 | to make| it a li|
|000008b0| 74 74 6c 65 20 63 6c 65 | 61 72 65 72 3a 0a 0a 73 |ttle cle|arer:..s|
|000008c0| 74 72 75 63 74 20 68 65 | 61 76 79 5f 61 74 6f 6d |truct he|avy_atom|
|000008d0| 2a 20 53 65 74 5f 50 6f | 73 69 74 69 6f 6e 5f 41 |* Set_Po|sition_A|
|000008e0| 41 5f 4e 75 6d 62 65 72 | 20 28 69 6e 74 20 72 65 |A_Number| (int re|
|000008f0| 73 69 64 75 65 5f 6e 75 | 6d 62 65 72 2c 20 0a 20 |sidue_nu|mber, . |
|00000900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000920| 20 20 20 20 20 20 20 73 | 74 72 75 63 74 20 68 65 | s|truct he|
|00000930| 61 76 79 5f 61 74 6f 6d | 20 2a 70 6f 73 69 74 69 |avy_atom| *positi|
|00000940| 6f 6e 5f 70 74 72 29 0a | 20 20 20 7b 0a 20 20 20 |on_ptr).| {. |
|00000950| 77 68 69 6c 65 20 28 70 | 6f 73 69 74 69 6f 6e 5f |while (p|osition_|
|00000960| 70 74 72 20 21 3d 20 4e | 55 4c 4c 29 0a 20 20 20 |ptr != N|ULL). |
|00000970| 20 20 7b 0a 20 20 20 20 | 20 69 66 20 28 70 6f 73 | {. | if (pos|
|00000980| 69 74 69 6f 6e 5f 70 74 | 72 2d 3e 72 65 73 5f 6e |ition_pt|r->res_n|
|00000990| 75 6d 62 65 72 20 3d 3d | 20 72 65 73 69 64 75 65 |umber ==| residue|
|000009a0| 5f 6e 75 6d 62 65 72 29 | 0a 20 20 20 20 20 20 20 |_number)|. |
|000009b0| 20 20 62 72 65 61 6b 3b | 0a 20 20 20 20 20 65 6c | break;|. el|
|000009c0| 73 65 0a 20 20 20 20 20 | 20 20 20 70 6f 73 69 74 |se. | posit|
|000009d0| 69 6f 6e 5f 70 74 72 20 | 3d 20 70 6f 73 69 74 69 |ion_ptr |= positi|
|000009e0| 6f 6e 5f 70 74 72 2d 3e | 63 6f 6f 68 5f 70 74 72 |on_ptr->|cooh_ptr|
|000009f0| 3b 0a 20 20 20 20 20 7d | 0a 20 20 20 72 65 74 75 |;. }|. retu|
|00000a00| 72 6e 20 70 6f 73 69 74 | 69 6f 6e 5f 70 74 72 3b |rn posit|ion_ptr;|
|00000a10| 0a 20 20 20 7d 0a 0a 54 | 68 69 73 20 77 69 6c 6c |. }..T|his will|
|00000a20| 20 74 65 72 6d 69 6e 61 | 74 65 20 74 68 65 20 6c | termina|te the l|
|00000a30| 6f 6f 70 20 69 66 20 74 | 68 65 20 72 65 73 69 64 |oop if t|he resid|
|00000a40| 75 65 20 6e 75 6d 62 65 | 72 20 69 73 20 66 6f 75 |ue numbe|r is fou|
|00000a50| 6e 64 20 6f 72 20 69 66 | 20 74 68 65 20 0a 70 6f |nd or if| the .po|
|00000a60| 73 69 74 69 6f 6e 20 70 | 6f 69 6e 74 65 72 20 72 |sition p|ointer r|
|00000a70| 65 61 63 68 65 73 20 74 | 68 65 20 65 6e 64 20 6f |eaches t|he end o|
|00000a80| 66 20 74 68 65 20 6c 69 | 73 74 2e 20 20 49 6e 20 |f the li|st. In |
|00000a90| 65 69 74 68 65 72 20 63 | 61 73 65 2c 20 74 68 65 |either c|ase, the|
|00000aa0| 20 0a 63 61 6c 6c 69 6e | 67 20 72 6f 75 74 69 6e | .callin|g routin|
|00000ab0| 65 20 73 68 6f 75 6c 64 | 20 74 65 73 74 20 74 68 |e should| test th|
|00000ac0| 65 20 72 65 74 75 72 6e | 20 76 61 6c 75 65 20 74 |e return| value t|
|00000ad0| 6f 20 6d 61 6b 65 20 73 | 75 72 65 20 69 74 20 69 |o make s|ure it i|
|00000ae0| 73 6e 27 74 20 4e 55 4c | 4c 0a 62 65 66 6f 72 65 |sn't NUL|L.before|
|00000af0| 20 61 74 74 65 6d 70 74 | 69 6e 67 20 74 6f 20 75 | attempt|ing to u|
|00000b00| 73 65 20 74 68 65 20 70 | 6f 69 6e 74 65 72 2e 0a |se the p|ointer..|
|00000b10| 0a 3e 54 68 65 20 6f 74 | 68 65 72 20 66 75 6e 63 |.>The ot|her func|
|00000b20| 74 69 6f 6e 20 74 68 61 | 74 20 63 6f 6e 74 61 69 |tion tha|t contai|
|00000b30| 6e 73 20 74 68 65 20 63 | 61 6c 6c 20 69 73 20 74 |ns the c|all is t|
|00000b40| 68 65 20 6e 65 78 74 20 | 6f 6e 65 3a 0a 3e 0a 3e |he next |one:.>.>|
|00000b50| 28 76 6f 69 64 29 20 46 | 75 6e 63 74 69 6f 6e 5f |(void) F|unction_|
|00000b60| 43 61 6c 6c 65 72 20 28 | 29 0a 3e 7b 0a 3e 69 6e |Caller (|).>{.>in|
|00000b70| 74 20 63 6f 75 6e 74 65 | 72 3b 0a 3e 0a 3e 73 74 |t counte|r;.>.>st|
|00000b80| 72 75 63 74 20 68 65 61 | 76 79 5f 61 74 6f 6d 20 |ruct hea|vy_atom |
|00000b90| 2a 66 69 72 73 74 5f 61 | 74 6f 6d 2c 0a 3e 20 20 |*first_a|tom,.> |
|00000ba0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000bb0| 2a 61 63 74 75 61 6c 5f | 61 74 6f 6d 3b 0a 3e 0a |*actual_|atom;.>.|
|00000bc0| 3e 2e 2e 0a 3e 2e 2e 0a | 3e 0a 3e 61 63 74 75 61 |>...>...|>.>actua|
|00000bd0| 6c 5f 61 74 6f 6d 20 3d | 20 53 65 74 5f 50 6f 73 |l_atom =| Set_Pos|
|00000be0| 69 74 69 6f 6e 5f 41 41 | 5f 4e 75 6d 62 65 72 20 |ition_AA|_Number |
|00000bf0| 28 63 6f 75 6e 74 65 72 | 2c 20 66 69 72 73 74 5f |(counter|, first_|
|00000c00| 61 74 6f 6d 29 3b 0a 3e | 0a 3e 2e 2e 0a 3e 2e 2e |atom);.>|.>...>..|
|00000c10| 0a 3e 0a 3e 7d 20 20 20 | 2f 2a 20 65 6e 64 20 6f |.>.>} |/* end o|
|00000c20| 66 20 46 75 6e 63 74 69 | 6f 6e 5f 43 61 6c 6c 65 |f Functi|on_Calle|
|00000c30| 72 20 2a 2f 0a 3e 0a 3e | 0a 3e 54 68 65 20 70 72 |r */.>.>|.>The pr|
|00000c40| 6f 62 6c 65 6d 20 69 73 | 20 69 66 20 49 20 64 65 |oblem is| if I de|
|00000c50| 62 62 75 67 20 61 6e 64 | 20 63 68 65 63 6b 20 74 |bbug and| check t|
|00000c60| 68 65 20 63 75 72 72 65 | 6e 74 20 76 61 6c 75 65 |he curre|nt value|
|00000c70| 73 20 6a 75 73 74 20 69 | 6e 20 74 68 65 20 6c 69 |s just i|n the li|
|00000c80| 6e 65 20 0a 3e 62 65 66 | 6f 72 65 20 63 61 6c 6c |ne .>bef|ore call|
|00000c90| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 49 20 | the fun|ction I |
|00000ca0| 68 61 76 65 3a 0a 3e 0a | 3e 63 6f 75 6e 74 65 72 |have:.>.|>counter|
|00000cb0| 20 3d 20 31 0a 3e 28 2a | 66 69 72 73 74 5f 61 74 | = 1.>(*|first_at|
|00000cc0| 6f 6d 29 2e 72 65 73 5f | 6e 75 6d 62 65 72 20 3d |om).res_|number =|
|00000cd0| 20 31 0a 3e 0a 3e 62 75 | 74 20 74 68 65 20 66 75 | 1.>.>bu|t the fu|
|00000ce0| 6e 63 74 69 6f 6e 20 72 | 65 63 65 69 76 65 73 3a |nction r|eceives:|
|00000cf0| 0a 3e 0a 3e 63 6f 75 6e | 74 65 72 20 3d 20 30 0a |.>.>coun|ter = 0.|
|00000d00| 3e 28 2a 66 69 72 73 74 | 5f 61 74 6f 6d 29 2e 72 |>(*first|_atom).r|
|00000d10| 65 73 5f 6e 75 6d 62 65 | 72 20 3d 20 31 0a 3e 0a |es_numbe|r = 1.>.|
|00000d20| 0a 41 72 65 20 79 6f 75 | 20 63 65 72 74 61 69 6e |.Are you| certain|
|00000d30| 20 61 62 6f 75 74 20 74 | 68 69 73 3f 20 20 54 68 | about t|his? Th|
|00000d40| 65 20 63 6f 75 6e 74 65 | 72 20 69 73 20 61 6e 20 |e counte|r is an |
|00000d50| 69 6e 74 20 70 61 73 73 | 65 64 20 62 79 20 76 61 |int pass|ed by va|
|00000d60| 6c 75 65 20 74 6f 20 74 | 68 65 20 0a 53 65 74 5f |lue to t|he .Set_|
|00000d70| 50 6f 73 69 74 69 6f 6e | 5f 41 41 5f 4e 75 6d 62 |Position|_AA_Numb|
|00000d80| 65 72 20 66 75 6e 63 74 | 69 6f 6e 2e 20 20 49 66 |er funct|ion. If|
|00000d90| 20 63 6f 75 6e 74 65 72 | 20 3d 20 31 20 69 6e 20 | counter| = 1 in |
|00000da0| 74 68 65 20 63 61 6c 6c | 2c 20 74 68 65 6e 20 74 |the call|, then t|
|00000db0| 68 65 20 0a 72 65 73 69 | 64 75 65 5f 6e 75 6d 62 |he .resi|due_numb|
|00000dc0| 65 72 20 70 61 72 61 6d | 65 74 65 72 20 69 6e 20 |er param|eter in |
|00000dd0| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 73 68 6f |the func|tion sho|
|00000de0| 75 6c 64 20 61 6c 73 6f | 20 62 65 20 61 20 31 2e |uld also| be a 1.|
|00000df0| 20 20 49 66 20 74 68 69 | 73 20 69 73 20 0a 6e 6f | If thi|s is .no|
|00000e00| 74 20 77 6f 72 6b 69 6e | 67 20 74 68 61 74 20 77 |t workin|g that w|
|00000e10| 61 79 2c 20 74 68 65 6e | 20 65 69 74 68 65 72 20 |ay, then| either |
|00000e20| 74 68 65 72 65 20 69 73 | 20 61 20 63 6f 6d 70 69 |there is| a compi|
|00000e30| 6c 65 72 20 62 75 67 2c | 20 6f 72 20 74 68 65 72 |ler bug,| or ther|
|00000e40| 65 20 69 73 20 61 20 0a | 70 72 6f 62 6c 65 6d 20 |e is a .|problem |
|00000e50| 69 6e 20 79 6f 75 72 20 | 70 72 6f 67 72 61 6d 20 |in your |program |
|00000e60| 28 6f 72 20 64 65 62 75 | 67 67 65 72 29 20 61 6e |(or debu|gger) an|
|00000e70| 64 20 79 6f 75 20 61 72 | 65 20 6e 6f 74 20 72 65 |d you ar|e not re|
|00000e80| 61 6c 6c 79 20 6c 6f 6f | 6b 69 6e 67 20 61 74 20 |ally loo|king at |
|00000e90| 0a 74 68 65 20 63 6f 72 | 72 65 63 74 20 76 61 72 |.the cor|rect var|
|00000ea0| 69 61 62 6c 65 2e 0a 0a | 0a 3e 0a 3e 49 20 61 6d |iable...|.>.>I am|
|00000eb0| 20 72 65 61 6c 6c 79 20 | 73 75 72 70 72 69 73 65 | really |surprise|
|00000ec0| 64 20 61 62 6f 75 74 20 | 74 68 61 74 2e 20 49 20 |d about |that. I |
|00000ed0| 61 6d 20 6e 6f 74 20 61 | 20 43 20 65 78 70 65 72 |am not a| C exper|
|00000ee0| 74 20 70 72 6f 67 72 61 | 6d 6d 65 72 20 61 6e 64 |t progra|mmer and|
|00000ef0| 20 74 68 69 73 20 0a 3e | 69 73 20 74 68 65 20 66 | this .>|is the f|
|00000f00| 69 72 73 74 20 74 69 6d | 65 20 74 68 61 74 20 49 |irst tim|e that I|
|00000f10| 20 63 6f 6e 73 74 72 75 | 63 74 20 61 20 66 75 6e | constru|ct a fun|
|00000f20| 63 74 69 6f 6e 20 74 68 | 61 74 20 72 65 74 75 72 |ction th|at retur|
|00000f30| 6e 73 20 61 20 70 6f 69 | 6e 74 65 72 2c 20 61 6e |ns a poi|nter, an|
|00000f40| 64 20 0a 3e 49 20 61 6d | 20 73 75 72 65 20 74 68 |d .>I am| sure th|
|00000f50| 61 74 20 74 68 65 20 70 | 72 6f 62 6c 65 6d 20 69 |at the p|roblem i|
|00000f60| 73 20 67 6f 69 6e 67 20 | 69 6e 20 74 68 61 74 20 |s going |in that |
|00000f70| 77 61 79 2c 20 62 65 63 | 61 75 73 65 20 74 68 65 |way, bec|ause the|
|00000f80| 20 73 61 6d 65 20 0a 3e | 66 75 6e 63 74 69 6f 6e | same .>|function|
|00000f90| 20 77 6f 72 6b 73 20 66 | 6f 72 20 6d 65 20 77 69 | works f|or me wi|
|00000fa0| 74 68 6f 75 74 20 72 65 | 74 75 72 6e 20 61 20 70 |thout re|turn a p|
|00000fb0| 6f 69 6e 74 65 72 2e 20 | 57 68 61 74 27 73 20 67 |ointer. |What's g|
|00000fc0| 6f 69 6e 67 20 6f 6e 20 | 68 65 72 65 20 3f 2e 20 |oing on |here ?. |
|00000fd0| 0a 3e 46 6f 72 20 6d 65 | 20 74 68 69 73 20 69 73 |.>For me| this is|
|00000fe0| 20 61 20 72 65 61 6c 6c | 79 20 73 74 72 61 6e 67 | a reall|y strang|
|00000ff0| 65 20 74 68 69 6e 67 20 | 61 62 6f 75 74 20 43 2e |e thing |about C.|
|00001000| 20 54 68 65 20 46 41 51 | 20 64 6f 65 73 6e 27 74 | The FAQ| doesn't|
|00001010| 20 63 6f 76 65 72 20 0a | 3e 61 62 6f 75 74 20 66 | cover .|>about f|
|00001020| 75 6e 63 74 69 6f 6e 73 | 20 72 65 74 75 72 6e 69 |unctions| returni|
|00001030| 6e 67 20 70 6f 69 6e 74 | 65 72 73 20 28 61 6e 64 |ng point|ers (and|
|00001040| 20 61 62 6f 75 74 20 66 | 75 6e 63 69 6f 6e 73 20 | about f|uncions |
|00001050| 69 6e 20 67 65 6e 65 72 | 61 6c 20 61 73 20 61 20 |in gener|al as a |
|00001060| 0a 3e 73 70 65 63 69 61 | 6c 20 73 65 63 74 69 6f |.>specia|l sectio|
|00001070| 6e 29 20 61 6e 64 20 66 | 6f 72 20 74 68 61 74 20 |n) and f|or that |
|00001080| 72 65 61 73 6f 6e 20 49 | 20 61 6d 20 61 73 6b 69 |reason I| am aski|
|00001090| 6e 67 20 68 65 72 65 2e | 20 49 66 20 79 6f 75 20 |ng here.| If you |
|000010a0| 6b 6e 6f 77 20 77 68 61 | 74 20 0a 3e 69 73 20 68 |know wha|t .>is h|
|000010b0| 61 70 70 65 6e 69 6e 67 | 20 77 6f 75 6c 64 20 62 |appening| would b|
|000010c0| 65 20 67 72 65 61 74 20 | 66 6f 72 20 6d 65 20 21 |e great |for me !|
|000010d0| 2e 20 49 6e 20 61 64 76 | 61 6e 63 65 2c 20 74 68 |. In adv|ance, th|
|000010e0| 61 6e 6b 73 20 61 20 6c | 6f 74 20 66 6f 72 20 79 |anks a l|ot for y|
|000010f0| 6f 75 72 20 0a 3e 74 69 | 6d 65 20 61 6e 64 20 68 |our .>ti|me and h|
|00001100| 65 6c 70 2c 20 62 65 73 | 74 20 77 69 73 68 65 73 |elp, bes|t wishes|
|00001110| 2c 0a 3e 0a 3e 0a 3e 46 | 72 61 6e 63 69 73 63 6f |,.>.>.>F|rancisco|
|00001120| 20 4d 65 6c 6f 20 4c 65 | 64 65 72 6d 61 6e 6e 0a | Melo Le|dermann.|
|00001130| 3e 0a 3e 0a 3e 6d 61 69 | 6c 74 6f 3a 66 6d 65 6c |>.>.>mai|lto:fmel|
|00001140| 6f 40 62 69 71 2e 66 75 | 6e 64 70 2e 61 63 2e 62 |o@biq.fu|ndp.ac.b|
|00001150| 65 20 0a 3e 0a 3e 68 74 | 74 70 3a 2f 2f 62 69 71 |e .>.>ht|tp://biq|
|00001160| 2d 70 63 31 2e 62 69 71 | 2e 66 75 6e 64 70 2e 61 |-pc1.biq|.fundp.a|
|00001170| 63 2e 62 65 2f 69 6e 64 | 65 78 2e 68 74 6d 6c 0a |c.be/ind|ex.html.|
|00001180| 0a 0a 0a 0a 0a 2d 2d 20 | 0a 2a 2a 2a 2a 2a 2a 2a |.....-- |.*******|
|00001190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000011a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000011b0| 2a 2a 2a 2a 2a 2a 2a 2a | 0a 42 72 69 61 6e 20 48 |********|.Brian H|
|000011c0| 69 62 62 65 72 74 20 20 | 62 5f 68 69 62 62 65 72 |ibbert |b_hibber|
|000011d0| 74 40 63 73 63 33 32 2e | 65 6e 65 74 2e 64 65 63 |t@csc32.|enet.dec|
|000011e0| 2e 63 6f 6d 0a 44 69 67 | 69 74 61 6c 20 45 71 75 |.com.Dig|ital Equ|
|000011f0| 69 70 6d 65 6e 74 20 43 | 6f 72 70 6f 72 61 74 69 |ipment C|orporati|
|00001200| 6f 6e 0a 41 6c 6c 20 6f | 70 69 6e 69 6f 6e 73 20 |on.All o|pinions |
|00001210| 65 78 70 72 65 73 73 65 | 64 20 61 72 65 20 6d 79 |expresse|d are my|
|00001220| 20 6f 77 6e 20 61 6e 64 | 20 73 68 6f 75 6c 64 0a | own and| should.|
|00001230| 6e 6f 74 20 62 65 20 61 | 73 73 75 6d 65 64 20 74 |not be a|ssumed t|
|00001240| 6f 20 62 65 20 74 68 65 | 20 6f 70 69 6e 69 6f 6e |o be the| opinion|
|00001250| 20 6f 66 20 6d 79 20 65 | 6d 70 6c 6f 79 65 72 0a | of my e|mployer.|
|00001260| 0a 0a 0a 0a 0a 0a 0a 0a | 0a 0a 0a 0a 0a 0a 0a |........|....... |
+--------+-------------------------+-------------------------+--------+--------+